//
//  DetailGrabTableViewCell.m
//  CloudMD
//
//  Created by apple on 16/2/18.
//  Copyright (c) 2016年 HuaZhengInfo. All rights reserved.
//

#import "DetailGrabTableViewCell.h"
#import "DotLineView.h"
#import "GetOrderDetailModel.h"


@implementation DetailGrabTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self buildUI];
    }
    return self;
}

//- (instancetype)initWithFrame:(CGRect)frame{
//
//    if (self = [super initWithFrame:frame]) {
//        [self buildUI];
//    }
//    return self;
//}

- (void)buildUI{
    
    _mainLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, SCR_W - 50, self.frame.size.height * 0.4)];
    _mainLabel.text = @"";
    _mainLabel.textAlignment = NSTextAlignmentLeft;
    _mainLabel.textColor = RED;
    _mainLabel.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:_mainLabel];
    
    _detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, CGRectGetMaxY(_mainLabel.frame)+10, self.frame.size.width-20, self.frame.size.height * 0.6)];
    if (iPhone4) {
        _detailLabel.frame = CGRectMake(10, CGRectGetMaxY(_mainLabel.frame), SCR_W - 20, self.frame.size.height * 0.6);
        _detailLabel.font = [UIFont systemFontOfSize:16];
    }
    _detailLabel.text = @"";
    _detailLabel.textAlignment = NSTextAlignmentLeft;
    _detailLabel.textColor = [UIColor blackColor];
    _detailLabel.font = [UIFont systemFontOfSize:18];
    _detailLabel.lineBreakMode = NSLineBreakByCharWrapping;
    _detailLabel.numberOfLines = 0;
    [self.contentView addSubview:_detailLabel];
    
    // 间隔虚线
//    DotLineView * line = [[DotLineView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_detailLabel.frame) + 5, SCR_W, 0.5)];
//    [self.contentView addSubview:line];
    

}






- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
